package cn.vivi.blog.service.impl;

import cn.vivi.blog.mapper.ArticleMapper;
import cn.vivi.blog.service.ArticleService;
import cn.vivi.common.entity.Article;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class ArticleServiceImpl implements ArticleService {

    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public Article findByBlogId(String id) {
        return articleMapper.selectOne(new QueryWrapper<Article>().eq("blog_id",id));
    }

}
